package aom.ju.ss.mode

import aom.ju.ss.utils.BigDecimalUtils

data class ShopOrderList(
    val code: Int,
    val count: Int,
    val `data`: List<ShopOrderListData>?,
    val error_type: Int,
    val mess: String,
    val msg: String,
    val status: Int
)

data class ShopOrderListData(
    val after_sale_status: Int,
    val id: String,
    val comment_status: Int,
    val goods_list: ShopOrderListGoodsList,
    val order_no: String,
    val shop: ShopOrderListGoodsListShop,
    val status: Int,
    val status_text: String,
    val time: String,
    val type: Int,
    val unpaid: String,
    val courier_no: String,

) {
    var youfei = "0"
        get() {
            field = BigDecimalUtils.sub(
                unpaid,
                BigDecimalUtils.mul(goods_list.price, goods_list.num.toString(), 2),
                2
            )

            return field
        }
}

data class ShopOrderListGoodsList(
    val goods_id: Int,
    val goods_image: String,
    val goods_name: String,
    val num: Int,
    val price: String,
    val sku_name: String
)

data class ShopOrderListGoodsListShop(
    val audit_status_text: String,
    val earnest_status_text: String,
    val logo: String,
    val name: String,
    val status_text: String
)